pkgname=bpftrace
pkgver=git
pkgrel=1
pkgdesc="bpftrace is a high-level tracing language for Linux enhanced Berkeley Packet Filter (eBPF) available in recent Linux kernels"
arch=(x86_64)
url="https://github.com/iovisor/bpftrace"
license=(Apache License V2)
depends=('')
makedepends_debian_11=(bison cmake flex g++ git libelf-dev zlib1g-dev libfl-dev systemtap-sdt-dev binutils-dev llvm-dev llvm-runtime clang libclang-dev libbpfcc-dev libcereal-dev libgtest-dev libgmock-dev asciidoctor)
source=('https://github.com/iovisor/bpftrace.git')
md5sums=('SKIP')

build()
{
    cd bpftrace
    git checkout v0.14_release
    mkdir build; cd build
    cmake -DCMAKE_BUILD_TYPE=Release ..
    make
}

package()
{
    cd bpftrace/build
    make DESTDIR="$pkgdir/" install
}
